<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>传值-B接受页面</title>
    <script src="https://cdn.bootcss.com/vue/2.6.5/vue.js"></script>
    <script src="https://cdn.bootcss.com/vue-router/3.0.2/vue-router.js"></script>
</head>

<body>
    <div id="app">
        显示A页面的传值
        <a href="javascript:void(0)" @click="goto">跳转...qwqwqwq</a>
    </div>
</body>
<script>
    new Vue({
        el: '#app',
        data: {
            result: '',
        },
        methods: {
            goto() {
                if (parseInt(this.result) == 1) {
                    console.log(this.result)
                    window.location.href = "./one.html"
                } else if (this.result == 2) {
                    console.log(this.result)
                    window.location.href = "../Vue/render.html"
                } else if (this.result == 3) {
                    console.log(this.result)
                    window.location.href = "../W3C网/index.html"
                }
            },
        },
        mounted() {
            var url = window.location.search; //获取url中"?"符后的字串  
            console.log(url)
            if (url.indexOf("?") != -1) {
                this.result = url.substr(url.indexOf("=") + 1);
                console.log(this.result);
            }
        }
    }, )
</script>

</html>